Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate modGui and its build logic #744

Merged
merged 1 commit into from
Dec 17, 2018
Merged

Conversation

aion-kelvin
Copy link
Contributor

@aion-kelvin aion-kelvin commented Dec 7, 2018

Notice

It is not allowed to submit your PR to the master branch directly, please submit your PR to the master-pre-merge branch.

Description

Please include a brief summary of the change that this pull request proposes. Include any relevant motivation and context. List any dependencies required for this change.

Isolate modGui and its build logic so it can be easily excluded from builds via gradle.properties. It is excluded from the build by default. To enable/disable, go to gradle.properties and uncomment the line modGuiPath=modGui.

This is the first step of moving modGui out of the main aion repo for licensing purposes. After this PR is merged, will then replace the modGui directory to be a Git submodule pointing at the "aion_gui" repo. What was previously in modGui directory will then be moved to aion_gui.

Fixes Issue # .

Type of change

Insert x into the following checkboxes to confirm (eg. [x]):

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

Please describe the tests you used to validate this pull request. Provide any relevant details for test configurations as well as any instructions to reproduce these results.

Checked that when modGui is disabled, the output of pack does not contain modGui or any JavaFX libs:

sergiu@aion-XPS-8930:~/repos/aion2$ grep 'modGuiPath' gradle.properties 
# modGuiPath=modGui
sergiu@aion-XPS-8930:~/repos/aion2$ ./gradlew clean build pack -q &> /tmp/noModGui
sergiu@aion-XPS-8930:~/repos/aion2$ tar tjf pack/aion.tar.bz2  | grep -e javafx -e aion_gui -e modGui

Checked that when modGui is enabled, output of pack includes modGui. Also extracted the packed .tar.bz2 and ran the GUI to make sure it still starts up.

sergiu@aion-XPS-8930:~/repos/aion2$ grep 'modGuiPath' gradle.properties 
modGuiPath=modGui
sergiu@aion-XPS-8930:~/repos/aion2$ ./gradlew clean build pack -q &> /tmp/withModGui
sergiu@aion-XPS-8930:~/repos/aion2$ tar tjf pack/aion.tar.bz2  | grep -e javafx -e aion_gui -e modGui
aion/aion_gui.sh
aion/jars/javafx-swing-11-linux.jar
aion/jars/javafx-graphics-11.jar
aion/jars/modGui.jar
aion/jars/javafx-base-11-linux.jar
aion/jars/javafx-controls-11-linux.jar
aion/jars/javafx-base-11.jar
aion/jars/javafx-graphics-11-linux.jar
aion/jars/javafx-fxml-11-linux.jar
aion/jars/javafx-controls-11.jar
aion/rt/lib/javafx.properties
aion/rt/lib/libjavafx_font_freetype.so
aion/rt/lib/libjavafx_iio.so
aion/rt/lib/libjavafx_font.so
aion/rt/lib/libjavafx_font_pango.so
aion/rt/lib/javafx-swt.jar
aion/rt/legal/javafx.fxml/
[ .. there's more files, but omitting them to shorten the PR description ... ]

Verification

Insert x into the following checkboxes to confirm (eg. [x]):

  • I have self-reviewed my own code and conformed to the style guidelines of this project.
  • New and existing tests pass locally with my changes.
  • I have added tests for my fix or feature.
  • I have made appropriate changes to the corresponding documentation.
  • My code generates no new warnings.
  • Any dependent changes have been made.

be easily excluded from builds via gradle.properties
@aion-kelvin aion-kelvin changed the base branch from master to master-pre-merge December 7, 2018 21:09
@aion-kelvin aion-kelvin self-assigned this Dec 7, 2018
Copy link
Collaborator

@AionJayT AionJayT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and Tested it.

@AionJayT AionJayT added this to the 0.3.3 milestone Dec 10, 2018
@AionJayT AionJayT added the enhancement New feature or request label Dec 10, 2018
Copy link
Contributor

@AlexandraRoatis AlexandraRoatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

For ease of use, I suggest adding a file modGui/README.md that contains the information that the GUI is disabled by default and what to uncomment and where to include the GUI in the packed binary.

Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested it manually, seems to work.

@AionJayT AionJayT merged commit 632147a into master-pre-merge Dec 17, 2018
@aion-kelvin aion-kelvin deleted the separate-gui2 branch December 18, 2018 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants